<!DOCTYPE html>
<html>
<head>
    <title>test</title>
    <script src="../bower_components/platform/platform.js"></script>
    <link rel="import" href="../bower_components/core-localstorage/core-localstorage.html">
    <link rel="import" href="../bower_components/paper-slider/paper-slider.html">
    <link rel="import" href="../api/jscut-simulate-gcode.html">
</head>
<body>
    <template id="top" is="auto-binding">
        <core-localstorage name="test-jscut-simulate-gcode-cutterDiameter" value="{{cutterDiameter}}"></core-localstorage>
        <core-localstorage name="test-jscut-simulate-gcode-cutterAngle" value="{{cutterAngle}}"></core-localstorage>
        <core-localstorage name="test-jscut-simulate-gcode-cutterHeight" value="{{cutterHeight}}"></core-localstorage>
        <core-localstorage name="test-jscut-simulate-gcode-gcode" value="{{gcode}}"></core-localstorage>

        <jscut-parse-gcode gcode="{{gcode}}" parsedgcode="{{parsedGcode}}"></jscut-parse-gcode>
        <jscut-simulate-gcode width=800 height=800 parsedgcode="{{parsedGcode}}" cutterdiameter="{{cutterDiameter}}" cutterangle="{{cutterAngle}}" cutterheight=" {{cutterheight}}" time1="{{time1}}" time2="{{time2}}" maxtimerounded="{{maxTime}}" elementsurl="../elements"></jscut-simulate-gcode>
        <br><paper-slider pin editable value="{{time1}}" immediatevalue="{{time2}}" max="{{maxTime}}" step="0.1" id="paper_slider"></paper-slider>
        <br><input type="number" step="any" value="{{cutterDiameter}}">
        <br><input type="number" step="any" value="{{cutterAngle}}">
        <br><input type="number" step="any" value="{{cutterHeight}}">
        <br><textarea value="{{gcode}}" rows="20" cols="60"></textarea>
    </template>

    <script>
        document.addEventListener('polymer-ready', function () {
            var top = document.querySelector('#top');
            top.cutterDiameter = .125;
            top.cutterHeight = 1;
            top.gcode =
                'G1 Z0.1 F100\n'+
                'G1 X0 Y0 F100\n'+
                'G1 Z0.0000\n'+
                'G1 Z-0.1250 F20\n'+
                'G1 X1 Y1 F40\n';
        });
    </script>
</body>
</html>
